﻿using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;

namespace KouDai.WinPad.Controls
{
    public class CustomGridView : GridView
    {
        protected override void PrepareContainerForItemOverride(DependencyObject element, object item)
        {
            base.PrepareContainerForItemOverride(element, item);
            IResize variableItem = (IResize)item;
            element.SetValue(VariableSizedWrapGrid.ColumnSpanProperty, variableItem.ColSpan);
            element.SetValue(VariableSizedWrapGrid.RowSpanProperty, variableItem.RowSpan);
        }
    }
}
